import logging
from flask import Flask,session
from flask import current_app
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager
from info import create_app, db, models # 导入models是为了让程序知道有这个文件的存在


app = create_app("develop")

# 1创建Migrate对象，关联app，db
Migrate(app, db)

# 2创建Manage对象，关联app
manager = Manager(app)

# 3给manager添加操作命令
manager.add_command("db", MigrateCommand)


if __name__ == '__main__':
    manager.run()
